#pragma once

#include <iostream>
#include <sstream>
#include <ctime>
using namespace std;
class Book;
class Date {
private:
	int year;
	int month;
	int day;
public:
	friend class Book;
	Date();
	Date(int byear, int bmonth, int bday);
	~Date();
	Date& setYear(int byear);
	void setMonth(int bmonth);
	void setDay(int bday);
	string getDate();
};

class Book {
private:
	int id;
	string name;
	string author;
	string publisher;
	string isbn;
	float price;
	Date pubdate;
public:
	Book(string bname,string bauthor,string bpublisher,string bisbn, float bprice, Date bpubdate);
	~Book();
	void setbBname(string bname);
	void setAuthor(string bauthor);
	void setPublisher(string bpublisher);
	void setIsbn(string bisbn);
	void setPrice(float bprice);
	void print();
	int pubYears();
	friend void Info(Book b);
	friend void lowPrice(Book a, Book b);
};
